/**
 * 
 */
package com.wutianyi.jta;

import javax.transaction.xa.Xid;

/**
 * @author hanjiewu
 * 
 *         2013-7-12-上午11:45:39
 */
public class MyXid implements Xid
{
    protected int formatId;
    protected byte gtrid[];
    protected byte bqual[];

    public MyXid()
    {

    }

    public MyXid(int formatId, byte[] gtrid, byte[] bqual)
    {
        this.formatId = formatId;
        this.gtrid = gtrid;
        this.bqual = bqual;
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.transaction.xa.Xid#getFormatId()
     */
    @Override
    public int getFormatId()
    {
        return formatId;
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.transaction.xa.Xid#getGlobalTransactionId()
     */
    @Override
    public byte[] getGlobalTransactionId()
    {
        return gtrid;
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.transaction.xa.Xid#getBranchQualifier()
     */
    @Override
    public byte[] getBranchQualifier()
    {
        return bqual;
    }

}
